package com.xp.agent.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

public class AlarmMessage {
	private String item;
	private long time;
	private long value;
	private long threshold;

	public AlarmMessage(String item, long time, long value, long threshold) {
		super();
		this.item = item;
		this.time = time;
		this.value = value;
		this.threshold = threshold;
	}

	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public long getValue() {
		return value;
	}

	public void setValue(long value) {
		this.value = value;
	}

	public long getThreshold() {
		return threshold;
	}

	public void setThreshold(long threshold) {
		this.threshold = threshold;
	}

	public String getFormatTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
		return sdf.format(new Date(time));

	}

}
